package itemplate

import "io"

const Version = "6.0.0"

type (
	// IWriter 模板读取
	IWriter interface {
		io.Writer
		WriteString(string) (int, error)
	}

	// ILoader 模板载入
	ILoader interface {
		Abs(base, name string) string
		Get(path string) (io.Reader, error)
	}

	IContext interface {
		Update(other IContext) IContext
	}

	ISet interface {
		FromString(string) (ITemplate, error)
		FromBytes([]byte) (ITemplate, error)
		FromFile(string) (ITemplate, error)
		RenderTemplateString(s string, ctx IContext) (string, error)
		RenderTemplateBytes(b []byte, ctx IContext) (string, error)
		RenderTemplateFile(fn string, ctx IContext) (string, error)
	}

	ITemplate interface {
		Parse()
		Lexer()
	}

	// ILexer 词法分析器
	ILexer interface {
	}
)
